import request from '@/utils/request'

// 查询验收工单列表
export function listOrders(query) {
  return request({
    url: '/system/orders/list',
    method: 'get',
    params: query
  })
}

// 查询验收工单详细
export function getOrders(query) {
  return request({
    url: '/kyhs/daily-report/select-accept-inf',
    method: 'get',
    params: {
      page: query.pageNum,
      pageSize: query.pageSize,
      acceptNum: query.acceptNum
    }
  })
}

// 新增验收工单
export function addOrders(data) {
  return request({
    url: '/system/orders',
    method: 'post',
    data: data
  })
}

export function updatePath(data) {
  return request({
    url: '/kyhs/accept-inf/bind-video',
    method: 'post',
    params: {
      acceptId: data.acceptId,
      video: data.video
    }
  })
}

// 删除验收工单
export function delOrders(id) {
  return request({
    url: '/system/orders/' + id,
    method: 'delete'
  })
}
